<include file="__THEME__/header" />
<link href="../Public/css/photo.css" rel="stylesheet" type="text/css" />
<link href="../Public/css/mark_photo.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__PUBLIC__/js/easySlider1.5.js"></script>
<script type="text/javascript">
<!--

//-->
</script>
<script type="text/javascript">

	var photo_id		=	'{$photo.id}';
	var photo_name		=	'{$photo.name}';
	var album_id		=	'{$album.id}';
	var now_index_id	=	'{$now}';
	var uid				=	'{$uid}';
	var now_play		=	'{.play}';
	/**
	//载入大图
	$(document).ready(function(){
	    $("#slider").easySlider({
		    prevId: 'Previous',
		    nextId: 'Next',
	        controlsShow:false,
	        firstShow: true,
	        lastShow: true,
	        vertical: true, 
	        continuous: true
	    });
		//大图预载
		var maxWidth	=	700; // 最大宽度700
		var image_url	=	"__ROOT__/thumb.php?w=700&h=700&t=f&url={$photo.savepath|get_photo_url}";
		image			=	new Image();
		image.onload	=	function(){
			$('#big_pic').attr('src',image_url);
			if(	$('#big_pic').attr('width') > 700 ){
				$('#big_pic').css('width','700px');
			}
		}
		image.src		=	image_url;

	});
	**/

	function deleteCommentCount( appid ){
		//计数
		$.post(APP+'/Index/deleteSuccess',{id:appid},function(result){
			if(result){
			    $('#commentCount').html(result);
				}
		});
	}

	function commentSuccess(json){
		//计数
		$.post(APP+'/Index/commentSuccess',{data:json},function(result){
		if(result){
            $('#commentCount').html(result);
        }
		});
	}
	
	function setMeLike(id){
        $.post(APP+'/Index/setMeLike',{id:id},function(result){
            if(result == -1){
                Alert('网络异常，请联系管理员');
            }else if(result == 0){
                Alert('您已经设定过我喜欢');
            }else{
            	location.reload();
            }
        });
	}
</script>
<script type="text/javascript" src="../Public/js/drag_sort.js"></script>
<script type="text/javascript" src="../Public/js/photo.js"></script>
<!-- 头部 end -->
<div class="content">
  <!-- 内容 begin  -->
  <include file="__THEME__/apps" />
  <div class="main">
    <!-- 右侧内容 begin  -->
    <div class="page_title">
      <!-- page_title begin -->
      <div class="left" style="width:70px;"> <span class="headpic50"><a href="__TS__/space/{$user.id}"><img src="{$user.id|getUserFace}" /></a></span> </div>
      <div class="left" style="width:650px;">
        <if condition=" ($type eq 'mAll') || ($type eq 'fAll') ">
          <h2>{$user.name}的全部照片</h2>
          <else />
          <h2>{$user.name}的相册“{$album.name}”</h2>
        </if>
        <p><a href="__TS__/space/{$user.id}">{$user.name}的空间</a> ┊ <a href="__TS__/Notify/write/uid/{$uid}">发站内信</a></p>
      </div>
      <div class="left alR lh30" style="width:100px;"><a href="javascript:window.history.back(-1)">返回上一页</a></div>
      <div class="c"></div>
    </div>
    <!-- page_title end -->
    <!-- 切换标签 end  -->
    <div class="lh30">
      <div class="btmline">
        <!-- 				<a href="javascript:void(0)" onclick="start_quanren()" id="start-quanren">开始圈人</a>
				<span id="finish-quanren"  style="display:none;background:#FFFBCC none repeat scroll 0 0;border:1px solid #FFEC19;">
					把认识的朋友圈出来!&nbsp;&nbsp;
					<a href="javascript:void(0)" onclick="cancel_quanren()"  style="color:green">点击完成圈人</a>
				</span> -->
        <div class="right">
          <div class="left"><a href="__APP__/Index/photo/id/{$pre.id}/aid/{$pre.albumId}/uid/{$pre.userId}<neq name="type" value="">/type/{$type}
            </neq>
            ">上一张</a> | <a href="__APP__/Index/photo/id/{$next.id}/aid/{$next.albumId}/uid/{$next.userId}<neq name="type" value="">/type/{$type}
            </neq>
            ">下一张</a>
            <!-- <a href="javascript:void(0)" onclick="play('button');" id="play_button">幻灯播放</a> -->
          </div>
          <div class="left">
            <eq name="album.share" value="1">
              <input type="button" style="margin-left:5px;" value="分享" class="BtnShare" onclick="sharePop('{$photo.id}','__URL__','photo')" id="BtnShare_{$photo.id}"/>
            </eq>
          </div>
        </div>
        第{$now}张，共{$photoCount}张
        <if condition=" ($type eq 'mAll') || ($type eq 'fAll') "> ┊ <a href="{$photo.savepath|get_photo_url}" target="_blank">查看原图</a> ┊ <a href="__APP__/Index/photos/uid/{$uid}" title="返回{$user.name}的照片">返回{$user.name}的照片</a>
          <else />
          ┊ <a href="__APP__/Index/album/id/{$album.id}/uid/{$uid}">返回相册"{$album.name}"</a> </if>
      </div>
    </div>
    <div class="photoBox">
      <div class="view">
        <div class="c1" style="width:710px;overflow:hidden;">
          <!-- 主图 -->
          <div class="alC" id="big_photo"> <a href="__APP__/Index/photo/id/{$next.id}/aid/{$next.albumId}/uid/{$next.userId}<neq name="type" value="">/type/{$type}
            </neq>
            "><img src="__ROOT__/thumb.php?w=700&h=700&t=f&url={$photo.savepath|get_photo_url}" pid="{$photo.id}" rel="{$photo.id}" id="big_pic" /></a> </div>
        </div>
        <!-- 滚动小图 -->
        <div class="c2" style="overflow:hidden;height:500px;">
        <span id="Previous" ><a href="javascript:void(0)" ><img src="../Public/images/pic_list_ioc_top.gif"/></a></span>
          <div id="slider">
			<ul>
				<volist name="previews" id="p">
				<li style="display:block;height:57px;">
<a href="__APP__/Index/photo/id/{$p.id}/aid/{$p.albumId}/uid/{$uid}<neq name="type" value="">/type/{$type}
				  </neq>
				  #show_pic"><img src="__ROOT__/thumb.php?w=50&h=50&url={$p.savepath|get_photo_url}" width="50" height="50"
				  <if condition=" $p[id] eq  $photo[id]">style="border:solid 2px #0000ff;"</if>
				  /></a>
				</li>
				</volist>
          	</ul>
          </div>
          <span id="Next"><a href="javascript:void(0)"><img src="../Public/images/pic_list_ioc_btm.gif"/></a></span>
        </div>
        <div class="clear" style="height:10px;"></div>
      </div>
      <div class="info_box">
        <div class="info" id="photo_info">
          <div>
            <h1>{$photo.name}</h1>
            <p>{$photo.info}</p>
          </div>
          <div>所属相册：<a href="__APP__/Index/album/id/{$album.id}/uid/{$album.userId}">{$album.name}</a>({$album.photoCount})</div>
          <div class="mt10" >
            <p>上传于：{$photo.cTime|friendlyDate} | <span id="commentCount">{$photo.commentCount}</span></>回应 | {$photo.readCount}次观看</p>
            <p>标签：{$tag}</p>
            <div style="width:500px; position:relative;">站外分享：
              <input type="text"  value="{$photo.savepath|get_photo_url}" size="40" style="width:290px;" />
              <a href="javascript:void(0)" onclick="$('#getLinkUrl').css('display','')">更多</a>
              <div class="HL_sec" id="getLinkUrl" style="display:none;">
              		<div class="right" style="padding:5px 0; width:20px;"><a href="javascript:void(0)" onclick="$('#getLinkUrl').css('display','none')"><img src="../Public/images/Remove_icon_02.gif" /></a></div>
          			<div class="list_HL">&nbsp;&nbsp;UBB代码：<input type="text" value='[img]{$photo.savepath|get_photo_url}[/img]' size="40" style="width:180px;" class="alM"/><embed class="alM ml5" controller="alM" height="24" align="middle" width="62" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" allowscriptaccess="sameDomain" wmode="transparent" quality="high" src="__PUBLIC__/js/Copy.swf" flashvars='txt=[img]{$photo.savepath|get_photo_url}[/img]" />'/></div>
              	
              		<div class="list_HL">HTML代码：<input type="text" value='<IMG src="{$photo.savepath|get_photo_url}" />' size="40" style="width:180px;" class="alM"/><embed class="alM ml5" controller="alM" height="24" align="middle" width="62" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" allowscriptaccess="sameDomain" wmode="transparent" quality="high" src="__PUBLIC__/js/Copy.swf" flashvars='txt=<IMG src="{$photo.savepath|get_photo_url}" />' /></div>
               </div>
            </div>

          </div>
        </div>
        <div class="c2">
          <div><a href="{$photo.savepath|get_photo_url}" target="_blank">查看原图</a></div>
          <if condition="$setting['open_camera'] eq 1">
            <div><a href="javascript:exif('{:base64_encode('../../data/uploads/'.$p['savepath'])}')">查看EXIF信息</a></div>
          </if>
          <!-- <div><a href="javascript:tag();" title="{$APPINFO['APP_CNNAME']}里出现了自己或者朋友？  圈出来，朋友就会自动看到哦">圈出{$APPINFO['APP_CNNAME']}中的人物</a></div> -->
          <if condition="$photo['userId'] eq $mid">
            <!-- <div>
				<div class="left mr10"><a href="javascript:dbrotate(-1);">左旋 <img alt="左旋" src="../Public/images/xz_l.gif" align="absmiddle" /></a></div>
				<div class="left"><a href="javascript:dbrotate(1);"><img alt="右旋" src="../Public/images/xz_r.gif" align="absmiddle" /> 右旋 </a></div>
			</div> -->
            <!-- <div><a href="javascript:sendtogrpalbum();">复制到群相册</a></div> -->
            <div><a href="javascript:editphoto();">修改标题和属性</a></div>
            <div id="divdelphoto"><a href="javascript:delphoto();">删除该照片</a></div>
            <div><a href="javascript:setcover();">设为专辑封面</a></div>
            <!-- <div><a href="javascript:setface();">设为我的头像</a></div> -->
            <else />
            <div>{:W('Report',array( 'type'=>'相片举报','appid'=>$APPINFO['APP_ID'],'url'=>'Index/photo/id/'.$p['id'].'/aid/'.$p['albumId'].'/uid/'.$uid,'title'=>$photo['name'],'recordId'=>$p['id']))}</div>
          </if>
        </div>
      </div>
      <div class="viewRC">
        <div class="c1" style="width:530px;"> {:W('Comment',array( 'type'=>'photo','appid'=>$photo['id'],'mid'=>$uid,"face"=>getUserFace($mid),'role'=>1))} </div>
        <div class="c3">
        	<h2>喜欢这张照片的人</h2>
            <ul>
                <volist name="meLike" id="vo" empty="暂无人喜欢这张照片">
            	   <li class="li"><a href="__TS__/space/{$vo.uid}" title="{$vo.name}"><img src="{$vo.uid|getUserFace}" /></a></li>
            	</volist>
            </ul>
            <h2>这些相片也属于</h2>
            <div>
            <div class="opus_box">
              <volist name="tagPhoto" id="vo">
        <script type="text/javascript">
        $(document).ready(function(){
            $("#slider{$key}").easySlider({
	            prevId: 'Previous{$key}',
	            nextId: 'Next{$key}',
	            controlsShow:false,
	            firstShow: true,
	            lastShow: true,
	            vertical: false,  //横向
	            photonum: 3,
	            continuous: false
            });     
        });
        </script>
            <div class="opus_tit">
            	<span class="right"><a href="#"></a></span>
            {$vo['tag']}</div>
                <div class="opus_img_list">
  
	                <div id="slider{$key}">
	  	             <ul>
	  	                <php>foreach($vo['photos'] as $photo_tag){</php>
	                       <li><a href="__APP__/Index/photo/id/{$photo_tag.id}/aid/{$photo_tag.albumId}/uid/{$photo_tag.userId}/type/mAll"><img src="__ROOT__/thumb.php?w=80&h=80&t=f&url={$photo_tag['savepath']|get_photo_url}" /></a></li>
	                    <php>}</php>
	                 </ul>
	                </div>
                </div>
           <div class="opus_btm">
           <span class="right"><a class="ri" href="#"></a></span>
		  <span id="Previous{$key}">
		  <a href="javascript:void(0)" class="left">上一个</a>
		  </span>
		  <span id="Next{$key}"><a href="javascript:void(0)">下一个</a></span>
		  </div>
		  </volist>
      </div>
</div>
        
        </div>
      </div>
    </div>
  </div>
  <!-- 右侧内容 end  -->
  <div class="c"></div>
</div>
<script>
    $(document).ready(function(){
	    $("#slider").easySlider({
	        prevId: 'Previous',
	        nextId: 'Next',
	        controlsShow:false,
	        firstShow: true,
	        lastShow: true,
	        vertical: true,   //是否为纵向的
	        photonum: 8,
	        movenum:  3, //移动的个数
	        defaultnum: {$now},
	        continuous: false
	    });
    });
</script>
<include file="__THEME__/footer" />